corrected some queries.