diff --git a/src/common/xcgroup.c b/src/common/xcgroup.c
index aac83fc30e18e7a69b50792d4ce21c570003c876..f94831bfd40aa46df93d2d154b72ad4c2f34aea9 100644
--- a/src/common/xcgroup.c
+++ b/src/common/xcgroup.c
@@ -307,7 +307,7 @@ int xcgroup_ns_find_by_pid(xcgroup_ns_t* cgns, xcgroup_t* cg, pid_t pid)
 			*e='\0';
 			/* get subsystems entry */
 			subsys = index(p, ':');
-			p=e;
+			p = e + 1;
 			if (subsys == NULL)
 				continue;
 			subsys++;