some fixes improvements for windows