some changes for typelib parsing