I had the exact same problem, removing the /b argument from "exit /b %ERRORLEVEL%" in my bat script fixex the issue for me