EXIT_ON_CLOSE added.