Do terrible things to make event handling work