Fixed bug with submission not working