Remy Maucherat
committed
on 03 Oct 14
Add a sync and use remaining() instead of something more convoluted which could fail.