Added removing categories with the same unique in gallery