Fix incorrect condition