Ensuring unique_id is really unique