Updated heartbeat script.