fix if statements