[bug fixing]
- the image of an instance could have been deleted, which will cause an issue 
- this code probably has to be reworked now