Fixed a bug when using AOE spells.