Fix NPE when submitting error occurred during import.
Merge pull request #889 from jburel/rebased/develop/submit-error

Fix NPE when submitting error occurred during import. (rebased onto develop)