fixed legacy lookahead bug