Fix event handlers