Fixed queries

Fixed queries that were wrong