Latest update to registry modification logic