diff --git a/userns.go b/userns.go
index <HASH>..<HASH> 100644
--- a/userns.go
+++ b/userns.go
@@ -113,7 +113,7 @@ func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
 				size = u.Uid
 			}
 			if u.Gid > size {
-				size = u.Uid
+				size = u.Gid
 			}
 		}
 	}
Coverity found an issue with copy and pasted code