Fix config handler to properly create/save config