fix the getting of gid