bug fix: clearAll must be done before terminationHandling, or dead avatars would not count in the same game cycle