fixed erorr with copy constructor