the first question is what is the value in both of those columns?
second question, what is the default value for those columns?
in your database you should make sure that the default value for both of those columns is 0. if it is NULL any math equation attempted will always fail.
NULL is the absence of a value.
NULL cannot be less then 1 or 2 because NULL does not exist.
as for updateing the value on page load, you can use the Before Page load trigger in the update record server behavior to accomplish this.