fixing missing fi from if statement