correct error reporting