fix small bug where query is not defined