added bug relating to nonexistant images