Fixed recursive copyTo with @pbzdyl's patch