Fix fatal error on submit. Closes #6