bug fixed for new rerouting idea