Fixed nullPointerException in gid and uid