Dijkstra algorithm now fails on unexpected search grid dimensions