Fix paging by ensuring 'page' param is a number