src: fix some mistakes for win