fix bug in getting group ids for the user