diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 19ab9315183fbed85dc87635d05fd362b416b7bb..1d05bb26e9d8a6828dacdfbdb5ca08772da5e8b2 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -4475,6 +4475,8 @@ int canvas_trymulticonnect(t_canvas *x, int xpos, int ypos, int which, int doit)
                                     x, y1, sel->sel_what,
                                     closest1, closest2, 1, 1);
                             }
+                            else
+                                closest1--;
                         }
                     }
                 }
@@ -4488,7 +4490,7 @@ int canvas_trymulticonnect(t_canvas *x, int xpos, int ypos, int which, int doit)
                         if (sel->sel_what != y1 && sel->sel_what != y2)
                         {
                             ob1 = pd_checkobject(&sel->sel_what->g_pd);
-                            noutlet1 = obj_ninlets(ob1);
+                            noutlet1 = obj_noutlets(ob1);
                             closest2++;
                             if (closest2 >= ninlet2)
                             {
@@ -4500,6 +4502,8 @@ int canvas_trymulticonnect(t_canvas *x, int xpos, int ypos, int which, int doit)
                                     x, sel->sel_what, y2,
                                     closest1, closest2, 1, 1);
                             }
+                            else
+                                closest2--;
                         }
                     }
                 }