Respect modal option when attempting close