Fixed bugs introduced while adding hasAnyWithinOi, hasAny, hasNext, hasPrev