Bug with error reporting fixed