Fixed assignment of reference to itself