fix double copy