fix loading wrong library bug