Fixed a few issues in the build process.