Fix error where lib is undefined.