Redirect top window from modal when leaving modal