Fixed a bug in ManhattanHeuristic.

As seen in PR #218 .