Fix Mac/Windows build
Fix warnings