Added duplicated long_id detection