Fix bug in copy constructor that was improperly copying the object.