Fixed a bug when copying and recursive.