Fix WriteConfig