fix error object in exception