bugfix in error reporting