fixed error that caused crash if a form field was empty