Fixing shortest path
Fix test