fixing the loss rate estimation, adding a new test for it, and a quick bug in the test suite