Fix bug with saving settings (from previous commit)