Fixed if statements