Fix extern lib bug