Removed recursion from shortest path
Looks like escape works