Fixed the bug where (-) in heuristic in haskell