fixed error in inCheck method