Fixing issues with error reporting.