Fixed media deletion error