error reporting fixes