fixed linking errors