Registry writing working