fixing bad quotes in sql