fixed the key-value persistence for generic types within a root class