fixed error case