More fixes for error reporting.