Fix linkage errors