Fixes AVM1 onXxxxx event handler