Fix SQL statements.