Error reporting bugfix