fixed the main config saving bit