Writes config registers correctly