fix potential memory leak, improve event
0.2.0