Fix cruft in refs.