don't genref the scalar before calling ref