Next button is not working properly on the form