fix CFA Ref alloc bug; factor toString out