fixed the query in where_dynamic_attr finder