Fixed syntax error when calling function