Form not working correctly each time.