Fixed duplicate bug in add_images