fix loop of rx/tx methods