Handling states between commands