fix assignment and copy constructor