fix badly written condition