Fix event handlers for FireFox