Fix eventhandler