Fixed bug when linking/unlinking multipe packages