Fix bug with assignment operator