More fixes to heartbeat.