fixed deregistering