Fixed major bug in get_next_routes