fix rawmode