fixes syntax error in SQL insert query