Fixed deprated assignment by reference

Deprecated:  Assigning the return value of new by reference is
deprecated