Fixing QUERY PAGES assignment