fix the bad linkage of the libraries