Added checkDeadEntities().