fix bad copying