Fixed a few errors with building