added heartbeat timeout