comparator potential bug fixed (coverity scan)