fixes for Windows support