Fixed a bug when the app crashed when tried to show the route.