Fixed some issues with Event equals and hashCode.