fix win build and remove warning