fixed rerouting bug