fix error code issue