Fix a typo and simplify a boolean expression.