Small fix

Moved declaration for shortestRoute out of for loop.