WEB-2750 fix condition & improve comparaison