Fix the code example of the add event.