Probably better to change these classes to unregister themselves on destruction.