io: handle duplex corner cases.