accept button not working when the sum not calculated