fix calculation of amount of RDY we can send