fix to img deletion