fix condition direction