fix bug in command remove