Added logic to verify that markActive completed before continuing the heartbeat.