fixed build script problems.