make exitOnClose settable at any time