fix cannot modify registry