fixes to query
fix to query