fix bugs in parsing partition table