Fixed a bug in ManhattanHeuristic.

As seen in #218 .