fixed a logic error when using Command and time