fixed bug when purgeOldHeartbeats action left an empty list and
getLatestHeartbeats failed to return the right data from the store