fix error code to proper one