fixed error in check