fix'ed error reporting