fix deregistration