Fixed a few errors when building