Bug in assignment operator