Get rid of query ref