Fixed possible memory leak in assignment operators