Fix copy constructor issues