bugs related to copy constructor