fix an incorrect condition