Fix "sample" case in addEvent()