Fix "Release" build issues and build.bat test fails