fixed event bugs