Optimisation use of count instead of foreach was causing errors to be thrown.
Merge pull request #742 from CorruptedHeart/EventDeathFix

Optimisation use of count instead of foreach was causing errors to be th...