fixed the raw mode bug