fixed rawmode thread flush