Fixed issue where  was undefined on form submit