Route calculator bug fix