fixes wrong beginning location in when routing