fixed event call by flush().