fixed if statements