Fix error reporting.