[MAT-437] fix bad cpy and add test