Revert "registry parent and sub key not getting created"

This reverts commit e1cbfa8c549f0aee65482b33c1967f5a24601dc9.