fix failed copy test

Fix issue #2852.