rescue from errors
fixing problem with shortest path
fix