distributor: fix potential overflow