Fixed a few build bugs