diff --git a/CHANGELOG b/CHANGELOG
index ea47e398fbde6375bb02b28f329e0e05ccecde92..65229e77a0f763ebcbfaac06f74b9a3560f84e6d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,8 @@
 - Added code to identify and warn of the presence of an Apple Partition
   Map (APM) on the disk.
 
+- Enabled MBR conversion code to handle multiple logical partitions.
+
 0.3.4:
 ------
 
diff --git a/gdisk.cc b/gdisk.cc
index 80520615c840618db7ee5cb6fc9a3efaaa8a4ab4..428111cdd221da6ded18ff7dec2487f824f9c3de 100644
--- a/gdisk.cc
+++ b/gdisk.cc
@@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
    int doMore = 1;
    char* device = NULL;
 
-   printf("GPT fdisk (gdisk) version 0.3.4\n\n");
+   printf("GPT fdisk (gdisk) version 0.3.5\n\n");
 
     if (argc == 2) { // basic usage
       if (SizesOK()) {
diff --git a/gpt.cc b/gpt.cc
index 19246fef7dc446b22d08651ae4ba68697d5c20cb..c06edfcf47f3a588c10730ccd8748f876803d566 100644
--- a/gpt.cc
+++ b/gpt.cc
@@ -731,7 +731,8 @@ int GPTData::XFormPartitions(MBRData* origParts) {
       origType = origParts->GetType(i);
 
       // don't convert extended, hybrid protective, or null (non-existent) partitions
-      if ((origType != 0x05) && (origType != 0x0f) && (origType != 0x00) && (origType != 0xEE)) {
+      if ((origType != 0x05) && (origType != 0x0f) && (origType != 0x85) && 
+          (origType != 0x00) && (origType != 0xEE)) {
          partitions[i].firstLBA = (uint64_t) origParts->GetFirstSector(i);
          partitions[i].lastLBA = partitions[i].firstLBA + (uint64_t)
                                  origParts->GetLength(i) - 1;
@@ -1904,4 +1905,3 @@ int SizesOK(void) {
    } // if
    return (allOK);
 } // SizesOK()
-
diff --git a/mbr.cc b/mbr.cc
index d907b568a59a8e915030cdcfde08e536d444ae8b..bf76d2c243bab0ef7eaf89a81b1889583bfa80f1 100644
--- a/mbr.cc
+++ b/mbr.cc
@@ -119,7 +119,7 @@ int MBRData::ReadMBRData(char* deviceFilename) {
 
 // Read data from MBR.
 void MBRData::ReadMBRData(int fd) {
-   int allOK = 1, i;
+   int allOK = 1, i, maxLogicals = 0;
    int err;
 
    // Clear logical partition array
@@ -176,9 +176,13 @@ void MBRData::ReadMBRData(int fd) {
          if ((partitions[i].partitionType == 0x05) || (partitions[i].partitionType == 0x0f)
              || (partitions[i].partitionType == 0x85)) {
             // Found it, so call a recursive algorithm to load everything from them....
-            allOK = ReadLogicalPart(fd, partitions[i].firstLBA, UINT32_C(0), 0);
-         } // if
-      } // for
+            maxLogicals = ReadLogicalPart(fd, partitions[i].firstLBA, UINT32_C(0), maxLogicals);
+            if ((maxLogicals < 0) || (maxLogicals > NUM_LOGICALS)) {
+               allOK = 0;
+               fprintf(stderr, "Error reading logical partitions! List may be truncated!\n");
+            } // if maxLogicals valid
+         } // if primary partition is extended
+      } // for primary partition loop
       if (allOK) { // Loaded logicals OK
          state = mbr;
       } else {
@@ -270,46 +274,54 @@ void MBRData::WriteMBRData(int fd) {
 } // MBRData::WriteMBRData(int fd)
 
 // This is a recursive function to read all the logical partitions, following the
-// logical partition linked list from the disk and storing the basic data in 
+// logical partition linked list from the disk and storing the basic data in the
+// logicals[] array. Returns last index to logicals[] uses, or -1 if there was a
+// problem
 int MBRData::ReadLogicalPart(int fd, uint32_t extendedStart,
                              uint32_t diskOffset, int partNum) {
-   int allOK = 1;
    struct EBRRecord ebr;
    off_t offset;
 
-   offset = (off_t) (extendedStart + diskOffset) * blockSize;
-   if (lseek64(fd, offset, SEEK_SET) == (off_t) -1) { // seek to EBR record
-      fprintf(stderr, "Unable to seek to %lu! Aborting!\n", (unsigned long) offset);
-      allOK = 0;
-   }
-   if (read(fd, &ebr, 512) != 512) { // Load the data....
-      fprintf(stderr, "Error seeking to or reading logical partition data from %lu!\nAborting!\n",
-              (unsigned long) offset);
-      allOK = 0;
-   } else if (IsLittleEndian() != 1) { // Reverse byte ordering of some data....
-      ReverseBytes((char*) &ebr.MBRSignature, 2);
-      ReverseBytes((char*) &ebr.partitions[0].firstLBA, 4);
-      ReverseBytes((char*) &ebr.partitions[0].lengthLBA, 4);
-   } // if/else/if
-
-   if (ebr.MBRSignature != MBR_SIGNATURE) {
-      allOK = 0;
-      printf("MBR signature in logical partition invalid; read 0x%04X, but should be 0x%04X\n",
-	     (unsigned int) ebr.MBRSignature, (unsigned int) MBR_SIGNATURE);
-   } /* if */
-
-   // Copy over the basic data....
-   logicals[partNum].status = ebr.partitions[0].status;
-   logicals[partNum].firstLBA = ebr.partitions[0].firstLBA + diskOffset + extendedStart;
-   logicals[partNum].lengthLBA = ebr.partitions[0].lengthLBA;
-   logicals[partNum].partitionType = ebr.partitions[0].partitionType;
+   if ((partNum < NUM_LOGICALS) && (partNum >= 0)) {
+      offset = (off_t) (extendedStart + diskOffset) * blockSize;
+      if (lseek64(fd, offset, SEEK_SET) == (off_t) -1) { // seek to EBR record
+         fprintf(stderr, "Unable to seek to %lu! Aborting!\n", (unsigned long) offset);
+         partNum = -1;
+      }
+      if (read(fd, &ebr, 512) != 512) { // Load the data....
+         fprintf(stderr, "Error seeking to or reading logical partition data from %lu!\nAborting!\n",
+                 (unsigned long) offset);
+         partNum = -1;
+      } else if (IsLittleEndian() != 1) { // Reverse byte ordering of some data....
+         ReverseBytes((char*) &ebr.MBRSignature, 2);
+         ReverseBytes((char*) &ebr.partitions[0].firstLBA, 4);
+         ReverseBytes((char*) &ebr.partitions[0].lengthLBA, 4);
+         ReverseBytes((char*) &ebr.partitions[1].firstLBA, 4);
+         ReverseBytes((char*) &ebr.partitions[1].lengthLBA, 4);
+      } // if/else/if
+
+      if (ebr.MBRSignature != MBR_SIGNATURE) {
+         partNum = -1;
+         fprintf(stderr, "MBR signature in logical partition invalid; read 0x%04X, but should be 0x%04X\n",
+                (unsigned int) ebr.MBRSignature, (unsigned int) MBR_SIGNATURE);
+      } // if
 
-   // Find the next partition (if there is one) and recurse....
-   if ((ebr.partitions[1].firstLBA != UINT32_C(0)) && allOK) {
-      allOK = ReadLogicalPart(fd, extendedStart, ebr.partitions[1].firstLBA,
-                              partNum + 1);
-   } // if
-   return (allOK);
+      // Copy over the basic data....
+      logicals[partNum].status = ebr.partitions[0].status;
+      logicals[partNum].firstLBA = ebr.partitions[0].firstLBA + diskOffset + extendedStart;
+      logicals[partNum].lengthLBA = ebr.partitions[0].lengthLBA;
+      logicals[partNum].partitionType = ebr.partitions[0].partitionType;
+
+      // Find the next partition (if there is one) and recurse....
+      if ((ebr.partitions[1].firstLBA != UINT32_C(0)) && (partNum >= 0) &&
+          (partNum < (NUM_LOGICALS - 1))) {
+         partNum = ReadLogicalPart(fd, extendedStart, ebr.partitions[1].firstLBA,
+                                   partNum + 1);
+         } else {
+            partNum++;
+      } // if another partition
+   } // Not enough space for all the logicals (or previous error encountered)
+   return (partNum);
 } // MBRData::ReadLogicalPart()
 
 // Show the MBR data to the user....
diff --git a/mbr.h b/mbr.h
index c178d1947bf4001910b2b57ef6e70be1d3afbd41..95ff4dfb461998b05525c0371a7a143a0c07e973 100644
--- a/mbr.h
+++ b/mbr.h
@@ -78,6 +78,8 @@ public:
    void ReadMBRData(int fd);
    int WriteMBRData(void);
    void WriteMBRData(int fd);
+   // ReadLogicalPart() returns last partition # read to logicals[] array,
+   // or -1 if there was a problem....
    int ReadLogicalPart(int fd, uint32_t extendedStart, uint32_t diskOffset,
                        int partNum);
    void DisplayMBRData(void);
diff --git a/parttypes.cc b/parttypes.cc
index 3f817974e0cb36f1fd14836ac4343efe416f88e3..cb61621b3864f058bc3ba603ab16e5295cef92cf 100644
--- a/parttypes.cc
+++ b/parttypes.cc
@@ -300,7 +300,8 @@ struct GUIDData PartTypes::IDToGUID(uint16_t ID) {
    } // while
    if (!found) {
       theGUID = IDToGUID(0x0700); // assign a default type code
-      printf("Exact type match not found; assigning type code for 'Linux/Windows data'\n");
+      printf("Exact type match not found for type code %lx; assigning type code for\n'Linux/Windows data'\n",
+             ID);
    } // if (!found)
    return theGUID;
 } // PartTypes::IDToGUID()