Avoid to on-by-one in worker function. (#285)