Some fixes and tests for Command