Winpr fixes

Fixes some winpr issues