fix the demo heuristic