Fixing some issues related to opening a modal with a new navigation controller.