Fixed import of pinned packages with the new features, and improved pin command