ensure all bytes are received