diff --git a/src/Common.hs b/src/Common.hs
--- a/src/Common.hs
+++ b/src/Common.hs
@@ -15,7 +15,6 @@
     ) where
 
 import Data.Char (isDigit)
-import Data.Maybe (fromJust)
 import Numeric (showHex)
 import Network.Socket
 
diff --git a/src/SimpleClient.hs b/src/SimpleClient.hs
--- a/src/SimpleClient.hs
+++ b/src/SimpleClient.hs
@@ -123,7 +123,7 @@
             supportedVers
                 | NoVersionDowngrade `elem` flags = [tlsConnectVer]
                 | otherwise = filter (<= tlsConnectVer) allVers
-            allVers = [SSL3, TLS10, TLS11, TLS12, TLS13]
+            allVers = [TLS13, TLS12, TLS11, TLS10, SSL3]
             validateCert = not (NoValidateCert `elem` flags)
 
 getGroups flags = case getGroup >>= readGroups of
diff --git a/src/SimpleServer.hs b/src/SimpleServer.hs
--- a/src/SimpleServer.hs
+++ b/src/SimpleServer.hs
@@ -55,7 +55,7 @@
         Nothing   -> return Nothing
         Just name -> readDHParams name
 
-    return ServerParams
+    return def
         { serverWantClientCert = False
         , serverCACertificates = []
         , serverDHEParams = dhParams
@@ -64,7 +64,6 @@
                              , sharedValidationCache = validateCache
                              , sharedCredentials     = Credentials [cred]
                              }
-        , serverHooks = def
         , serverSupported = def { supportedVersions = supportedVers
                                 , supportedCiphers = myCiphers
                                 , supportedGroups = getGroups flags
@@ -120,7 +119,7 @@
             supportedVers
                 | NoVersionDowngrade `elem` flags = [tlsConnectVer]
                 | otherwise = filter (<= tlsConnectVer) allVers
-            allVers = [SSL3, TLS10, TLS11, TLS12, TLS13]
+            allVers = [TLS13, TLS12, TLS11, TLS10, SSL3]
             validateCert = not (NoValidateCert `elem` flags)
             allowRenegotiation = AllowRenegotiation `elem` flags
 
@@ -233,7 +232,7 @@
                     then loopSendData getBenchAmount ctx
                     else loopRecvData getBenchAmount ctx
                 bye ctx
-            close cSock
+              `E.finally` close cSock
           where
             dataSend = BC.replicate 4096 'a'
             loopSendData bytes ctx
@@ -256,7 +255,7 @@
             let rtt0accept = Rtt0 `elem` flags
             params <- getDefaultParams flags certStore sStorage cred rtt0accept
 
-            void $ forkIO $ do
+            void $ forkIO $
                 runTLS (Debug `elem` flags)
                        (IODebug `elem` flags)
                        params cSock $ \ctx -> do
@@ -266,7 +265,7 @@
                     --sendData ctx $ query
                     bye ctx
                     return ()
-                close cSock
+                  `E.finally` close cSock
             doTLS sock out
 
         loopRecv out ctx = do
diff --git a/tls-debug.cabal b/tls-debug.cabal
--- a/tls-debug.cabal
+++ b/tls-debug.cabal
@@ -1,5 +1,5 @@
 Name:                tls-debug
-Version:             0.4.6
+Version:             0.4.7
 Description:
    A set of program to test and debug various aspect of the TLS package.
    .
