Fix incorrect value used in comparison