Fixes submit on error