diff --git a/Database/RethinkDB.hs b/Database/RethinkDB.hs
--- a/Database/RethinkDB.hs
+++ b/Database/RethinkDB.hs
@@ -74,7 +74,7 @@
   map, zipWith, zipWithN,
   withFields, concatMap,
   orderBy, asc, desc,
-  skip, limit, slice,
+  skip, limit, slice, nth,
   indexesOf, isEmpty, union, sample,
 
   -- * Aggregation
diff --git a/Database/RethinkDB/Driver.hs b/Database/RethinkDB/Driver.hs
--- a/Database/RethinkDB/Driver.hs
+++ b/Database/RethinkDB/Driver.hs
@@ -6,6 +6,8 @@
   Result(..),
   runOpts,
   RunFlag(..),
+  Durability(..),
+  durability,
   WriteResponse(..),
   Change(..)
   ) where
@@ -60,6 +62,14 @@
 
 data Durability = Hard | Soft
 
+instance Expr Durability where
+  expr Hard = "hard"
+  expr Soft = "soft"
+
+-- | Optional argument for soft durability writes
+durability :: Durability -> Attribute a
+durability d = "durability" := d
+
 renderOption :: RunFlag -> (Text, Datum)
 renderOption UseOutdated = "read_mode" .= ("outdated" :: String)
 renderOption (ReadMode Majority) = "read_mode" .= ("majority" :: String)
@@ -115,7 +125,7 @@
 
 instance FromDatum a => Result (Cursor a) where
   convertResult r = do
-    c <- makeCursor r 
+    c <- makeCursor r
     return c { cursorMap = unsafeFromDatum }
 
 unsafeFromDatum :: FromDatum a => Datum -> IO a
@@ -144,7 +154,7 @@
         Error a -> return $ Left $ RethinkDBError ErrorUnexpectedResponse (Datum Null) a []
 
 instance FromDatum a => Result (Maybe a) where
-  convertResult v = do 
+  convertResult v = do
       ed <- convertResult v
       case ed of
         Left _ -> return Nothing
diff --git a/Database/RethinkDB/Functions.hs b/Database/RethinkDB/Functions.hs
--- a/Database/RethinkDB/Functions.hs
+++ b/Database/RethinkDB/Functions.hs
@@ -350,6 +350,13 @@
 slice :: (Expr a, Expr b, Expr c) => a -> b -> c -> ReQL
 slice n m s = op SLICE (s, n, m)
 
+-- | Get nth element of a sequence
+--
+-- >>> run h $ nth 2 [1, 2, 3, 4, 5]
+-- 3
+nth :: (Expr a, Expr seq) => a -> seq -> ReQL
+nth a s = op NTH (s, a)
+
 -- | Reduce a sequence to a single value
 --
 -- >>> run h $ reduce0 (+) 0 [1, 2, 3]
@@ -1028,16 +1035,6 @@
 -- | Optional argument for changes
 includeInitial :: Attribute a
 includeInitial = "include_initial" := P.True
-
-data Durability = Hard | Soft
-
-instance Expr Durability where
-  expr Hard = "hard"
-  expr Soft = "soft"
-
--- | Optional argument for soft durability writes
-durability :: Durability -> Attribute a
-durability d = "durability" := d
 
 -- | Optional argument for non-atomic writes
 --
diff --git a/Database/RethinkDB/Network.hs b/Database/RethinkDB/Network.hs
--- a/Database/RethinkDB/Network.hs
+++ b/Database/RethinkDB/Network.hs
@@ -29,7 +29,7 @@
 import Data.Typeable (Typeable)
 import Network (HostName)
 import Network.Socket (
-  socket, Family(AF_INET, AF_INET6), SocketType(Stream), sClose, setSocketOption,
+  socket, Family(AF_INET, AF_INET6), SocketType(Stream), setSocketOption,
   SocketOption(NoDelay, KeepAlive), Socket, AddrInfo(AddrInfo, addrAddress, addrFamily))
 import qualified Network.Socket as Socket
 import Network.BSD (getProtocolNumber)
@@ -120,7 +120,7 @@
   let addrI = head h
   let addrF = getAddrFamily addrI
   proto <- getProtocolNumber "tcp"
-  bracketOnError (socket addrF Stream proto) sClose $ \sock -> do
+  bracketOnError (socket addrF Stream proto) Socket.close $ \sock -> do
     Socket.connect sock (addrAddress addrI)
     setSocketOption sock NoDelay 1
     setSocketOption sock KeepAlive 1
@@ -333,7 +333,7 @@
   tid <- myThreadId
   let h = h' tid
   let handler e@SomeException{} = do
-        sClose $ rdbSocket h
+        Socket.close $ rdbSocket h
         modifyMVar (rdbWriteLock h) $ \_ -> return (Just e, ())
         writeIORef (rdbWait h) M.empty
   flip catch handler $ forever $ readSingleResponse h
@@ -384,7 +384,7 @@
 close h@RethinkDBHandle{ rdbSocket, rdbThread } = do
   noReplyWait h
   killThread rdbThread
-  sClose rdbSocket
+  Socket.close rdbSocket
 
 closeToken :: RethinkDBHandle -> Token -> IO ()
 closeToken h tok = do
diff --git a/Database/RethinkDB/ReQL.hs b/Database/RethinkDB/ReQL.hs
--- a/Database/RethinkDB/ReQL.hs
+++ b/Database/RethinkDB/ReQL.hs
@@ -37,7 +37,11 @@
   ) where
 
 import qualified Data.Aeson as J
+#if MIN_VERSION_aeson(1,0,0)
+import qualified Data.Aeson.Text as J
+#else
 import qualified Data.Aeson.Encode as J
+#endif
 import qualified Data.Text.Lazy as LT
 import qualified Data.Text.Lazy.Builder as LT
 import Data.Aeson (Value)
diff --git a/rethinkdb.cabal b/rethinkdb.cabal
--- a/rethinkdb.cabal
+++ b/rethinkdb.cabal
@@ -1,5 +1,5 @@
 name: rethinkdb
-version: 2.2.0.6
+version: 2.2.0.7
 cabal-version: >=1.8
 build-type: Simple
 license: Apache
@@ -31,7 +31,7 @@
         base >=4 && <4.10,
         unordered-containers ==0.2.*,
         text >=0.11 && <1.3,
-        aeson >=0.7 && <0.12,
+        aeson >=0.7 && <1.1,
         bytestring ==0.10.*,
         containers ==0.5.*,
         data-default >=0.5 && <0.8,
