Improve shortest path.