fixed repartition bug