fixed extra tag deq when command is invalid (causes test to not finish); added state to tell us when the test is done