fixed connection timeout handling