Fixed removeAllCommands() bug that caused some commands not to be remove...

...d in certain usage scenarios.