error-reporting bugfix