fixed infinite recursion in checkEntity(IEntity)