Fixed bug in static heuristic