Fixed a few linking errors