Fixed option dialogs to properly handle "close window" actions