Form is not loading and submitting properly