Fixed bug in assignment operator