fix error from copying