focusOnClose improvement