diff --git a/SOURCE/MEM/MEM.C b/SOURCE/MEM/MEM.C
index 238878d..cccf9fb 100644
--- a/SOURCE/MEM/MEM.C
+++ b/SOURCE/MEM/MEM.C
@@ -1775,9 +1775,24 @@ static void register_mcb(MINFO *mlist)
      * be equal to seg + 1.
      */
     if (mlist->owner && (is_psp(mlist->seg) || mlist->owner == mlist->seg + 1))
+    {
 	program_mcb(mlist);
-    else
-	register_dos_mcb(mlist);
+	return;
+    }
+    if (mlist->owner)
+    {
+	mcb = MK_FP(mlist->owner - 1, 0);
+	if ((mcb->type == 'M' || mcb->type == 'Z') && mcb->owner == mlist->owner)
+	{
+	    mlist->name = xmalloc(MCB_NAME_MAX_LEN + 1);
+	    check_name(mlist->name, mcb->name, MCB_NAME_MAX_LEN);
+	    mlist->type=MT_PROGRAM;
+	    return;
+	}
+    }
+
+    register_dos_mcb(mlist);
+    return;
 }
 
 static MINFO *make_mcb_list(unsigned *convmemfree)
@@ -1812,6 +1827,7 @@ static MINFO *make_mcb_list(unsigned *convmemfree)
     mlist->size = 0x30;
     mlist->type = MT_BDA;
     mlist->next = new_minfo();
+    mlist->name = "ROMBIOS";
     mlist->next->seg = mlist->seg + mlist->size;
     mlist = mlist->next;
 
@@ -1947,9 +1963,9 @@ static void set_dev_minfo(DEVINFO *dlist, MINFO *mlist)
 {
     if (dlist->minfo != NULL) {
 	printf(_(1,4,
-"Warning: device appears to be owned by multiple memory blocks (%s\n"
+"Warning: device %s appears to be owned by multiple memory blocks (%s\n"
 "and %s)\n"),
-	       mlist->name, dlist->minfo->name);
+	       dlist->devname, mlist->name, dlist->minfo->name);
 	dlist->next_in_minfo = NULL;
     }
     dlist->minfo = mlist;
