Fixed a bug where the host id wasn't updated correctly for heartbeats