Removed race condition in favorites.