Fix bug, chang return format of eventhandler