Adjustments to getPage and the query with route ids