added state check on flow control commands