fixed issue we error code handling