The i/o is asynchronous, so it's possible for the gateway to receive a terminal ack from the exchange, remove the order from its index, then receive a cancel/modify req from an algo that submitted the req before it knew the order reached a terminal state.