Some event bugs fixed