Fix issue with duplicate images