fixing issue with images being downloaded multiple times