made the uid/gid stuff more portable