Fixed a crash bug related to corrupting planned actions.