fixed handling of partition numbers