Fixed bug where emails not sent on submit