fix "add event" bug