Fix source copy performance problem