minor bug on error reporting fixed