fix deleting images