Fix external linkage problem