Fixed more SQL queries.