fixes syntax error in ajax call