Fix events and edge case.