Calculation form not working properly