Fix syntax error in functions