fixes SQL queries by adding semicolons at the end