fixed two minor issues when the pb api returns no data.