Fixed bug when there are no records for a particular status.