update head only if necessary