Fixed and simplified handling of errors from ajax from submissions