Fix a bug in Partition, be careful of the array bounder