fix copy assignment mistakes and address reviewer comments