fix error reporting error