Fix events code example and its description