Fix bug in new error checks.