Windows fixes & oprimizations