fix some linkage errors