proper fix for error output when submission fails