fix infinite loop in inCheck()