Modified key deregistering.