exit on close reimplemented