directly exit, when close event is set