fixed bug in command processor, expanded unit tests to cover bug