Fixed syntax error in functions