Fixed problem with rerouting and modal