fixed set! memo semantics