bug reported by Jorge Stolfi. The printproc for the ref type is wrong.

