fix ids for MediaGallery duplication