Fix a bug: "if fi" syntax error