fix debug auto flush