build script updates & fixing the tests