If statement

replaced two pointless comparisons with one pointless instead.