Minor fixes in lookahead heuristic