Fix exit issue