Fix bug with finding group of a user

Signed-off-by: Alexander Cogneau <alexander.cogneau@hotmail.be>