fixed generation of copy constructor