minor fix in heuristic