transform gid/aid with public ones