Fix default connection timeout

Also, remove unnecessary codes