Can't reliably do T/R switching with valves with UHD and RFX400

I am trying to switch a GRC transceiver between transmit and receive
using a
boolean variable that shows up on the GUI as a pair of QT radio button
or as
a checkbox. The boolean variable controls two valves, one between the
source and the rest of the receiver, and the other between the transmit
chain and the UHD sink. I am using an RFX400.

The idea is that when I’m in receive mode, the valve to the UHD sink is
(not passing samples), so the UHD driver turns off the transmitter, and
can receive.

This does not work reliably. When I start the graph, it’s in receive
and all is well. When I click on the transmit button, it stops receiving
audio) and it transmits just fine. When I switch back to receive,
it works, the transmit carrier disappears (I can see it in another
radio) and the receive chain starts working again, producing audio. But
other times, the receive chain starts up (I guess because the valve from
UHD source closes), but the RFX400 keeps the transmitter’s carrier on. I
see it in another radio. It does not appear to be modulated.

Am I doing something wrong? I thought that stopping the samples to the
sink with a valve will turn off the transmitter in the RFX400. Is there
another, more explicit way to tell the daughter board to stop and start
transmitter under UHD?

Thanks, Sivan T.