Fix discrepancies in heuristic functions and only show heuristic value for non-repeat states.