fixed a few errors with the build script