Make example work with new gallery API