more fixes for Windows support