patch from HM to avoid allocating absurdly long uids