Really fix event definition table along with code that makes it