Query fix: pageOf property needs to be set before building query