Fix bug with non deleting images