fixed errors in copyconstructor