fix registry overwrite