Fixed a state preservation crash with editing