Fixed some errors caused by sqlite and quotation marks.