Fix Event Handling bugs