fixes and enhancements for windows