refactor windows fix