Fix 539 and fix idle-timeouts from firing during long pending writes