Changed sanitize function for setting