improved accuracy on high latency environment; shorten is not a function and avoids a buffer overflow.

--HG--
branch : 2.0