Fix location bugs in recovery heuristic