Handle case when there are no popular packages

Change-Id: I6957791ed9f4d66a2fffe5e9b64bbc5a4be6710e