fix eventhandler