Bugs fixed in dynamic_routing_algorithm