fix manhattan heuristic