fixed duplicate command removal