fix bug with saving settings