Saving settings, but not correctly