Fixed crash when route is added.