fixed potential event memleak