fix on-event list-ref out-of-range