Fixed bug in lookaheaditerator