fixed issues with saving settings