Fix if statement boolean logic.