Correcting the if statements spacing