fix connection with timeout