fixed heuristics bug