Fix if statements