prevent swapping off twice when cleanup