don't destroy resource after it is already destroyed