fixed crashing on empty event list