fix global leak
fix event leak