Form not working properly on mobile devices