Added focusOnClose setting