Fixed an infinite loop bug in _transmitBodyType