Fix crashbug with c not properly being set in heartbeat