fix if else expansion