Fix connection timeout mechanism