fix to query