fix a bug caused by `Remove` command