fixed hasNext