Remove duplicated items in gallery