Fix evi crash when defining more than 10 events
(cherry picked from commit ba04cba6d5f7bc945bbc42d2e46694639fea8b79)