Added check for past heartbeats