The final correction for queue lengths should be moved forwards in time, not backwards, since all other samples also move forwards. This was causing the final correction to be applied one interval too early in some circumstances, leading to temporary claims of negative queue lengths.