Made the button to change state submittable