Fixed a bug while copying internal commands.