take care of exit issue