Adjust queries for new schema
Fix query