modified build script, minor test fixes