fix querying instances
fix querying instances