Fix saving settings