fixed a bug in direct route finder

don't know what was i thinking when i wrote it!
Merge branch 'master' into map_support