Fix - change pattern to QUERY_REF