Fixed logic error when uid == 0 not checking for uniqueness