Fix if, else statement