fixed error in event script