Fix bug where middlware was counting 1 too many workers