Fixed a bug in the delta heuristic.