clean ups before hanoi