Small fixes in heartbeat