Fixed a bug where we had a mismatch in the submission types, got rid of use of flash messages to show errors