Merge "improve timeout handling"