heartbeat timeout callback fix, style fix