Fixed a bug in event reconstruction