Fix pagination bug on media archives