fixed the comparisons