Fix bug with throwing destructors.