Fixed issues with pinned metadata handling and uninstall