fix in event functions