Fix race condition that caused commands such as stop_rx_streaming to fail.