Fix userid check, also reserve GID 1000.