LRDCOM-11817 Fix logic