Calculation not working properly on form