Fix some issues, make it work with windows driver

Signed-off-by: xcgspring <xcg1987xcg@126.com>