Fixes for windows build