trimmed settings before saving