fix unpacking of event number