Fixes some registry stuff.