sanitize update tmp variable