fixed bug in RefTo datatype

removed memoize.