Saving settings in db