fix exit script