Fixed some queries.