Change heartbeat timeout code