register on termination