[server] Fix bugs in copy/move.