Fix issue where heartbeats stop being sent