fixed a potential mem leak in assignment operator overload.