Fixing errors in build script