Fixes to stats.

Change-Id: I6e3f8685f55c122391d53656dead7a7fbe3e1041