fixed some linking issue