fix sporidic issues, certificate verification error and socket read timeout