move heartbeat check to only occur on timeouts