Fixes the paging queries for media/content with sql params