fixed registry stuff