Fix BinDistributor and added Test