Fixes for the Windows platform

Can you please merge?