Fix bug where form was submitting photo over and over