diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index 58887122b48ef618dd1ebd795973f37b1965d19f..3c08de3f51139fd8af197a67ad582ffa2748d787 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -4713,7 +4713,7 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
                         *(t_float *)(((char *)(array->a_vec) + elemsize * i)
                             + xonset));
                 //else usexloc = x1; //usexloc = basex + xsum, xsum += xinc;
-                usexloc = basex + xsum, xsum += xinc;
+                usexloc = xloc + basex + xsum, xsum += xinc;
                 if (yonset >= 0)
                     yval = *(t_float *)(((char *)(array->a_vec) + elemsize * i)
                         + yonset);