fixed error return code