avoid crash on event