rewrites fix for Win system
merge