Fixed some bugs in dumppartitions