fix crash caused by incorrect query in scope

setting all categories to be secured led to a blank screen on all pages