Fix shortestPath() for when only one end node is bound