fix "next" and "prev" buttons on media page