fixed model of ref to eliminate recursion

P.I.T.A.