Fix crash when add to favorites.