fixed broken query on results page