fix pagination in page, category, media, and fix bug on media edit