Fixed bug in Partitioner