fixed a bug on closing PartitionManager.