Fix a bug in send event.