fix exit trap