fixed linkage errors