Fix potential crash in rx and tx distribution