Fix typo, fix casting for successful Windows build