fixed error in events