Added check to filter out empty packages.