Fix linear heuristic