Fix enter/leave event.