[PATCH RFC] clumsy attempt at fixing rate plugin draining function