diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,11 @@
 # Changelog for Calamity
 
+## 0.1.14.3
+
+*2020-06-10*
+
+* Fix some bugs in the gateway
+
 ## 0.1.14.2
 
 *2020-06-09*
diff --git a/calamity.cabal b/calamity.cabal
--- a/calamity.cabal
+++ b/calamity.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 2a89c6e83c7636ffaf0e0f4474f87664467293685a6a21eea8fc9cc332e6e39b
+-- hash: 9dad5aee926a8bb786caf940edbfef86c22f29c508eefff636e965a4d10a01af
 
 name:           calamity
-version:        0.1.14.2
+version:        0.1.14.3
 synopsis:       A library for writing discord bots
 description:    Please see the README on GitHub at <https://github.com/nitros12/calamity#readme>
 category:       Network, Web
diff --git a/src/Calamity/Gateway/Shard.hs b/src/Calamity/Gateway/Shard.hs
--- a/src/Calamity/Gateway/Shard.hs
+++ b/src/Calamity/Gateway/Shard.hs
@@ -50,6 +50,7 @@
 import           Prelude                         hiding ( error )
 
 import           Wuss
+import qualified Data.Text.Lazy as L
 
 data Websocket m a where
   RunWebsocket :: Text -> Text -> (Connection -> m a) -> Websocket m a
@@ -140,12 +141,12 @@
         r <- atomically $ tryWriteTBMQueue' outqueue (Control v)
         when r inner
 
-  handleWSException :: SomeException -> IO (Either ControlMessage a)
+  handleWSException :: SomeException -> IO (Either (ControlMessage, Maybe Text) a)
   handleWSException e = pure $ case fromException e of
     Just (CloseRequest code _)
       | code `elem` [1000, 4004, 4010, 4011] ->
-        Left ShutDownShard
-    _ -> Left RestartShard
+        Left (ShutDownShard, Nothing)
+    e -> Left (RestartShard, Just . L.pack . show $ e)
 
   discordStream :: P.Members '[LogEff, MetricEff, P.Embed IO, P.Final IO] r => Connection -> TBMQueue ShardMsg -> Sem r ()
   discordStream ws outqueue = inner
@@ -153,7 +154,8 @@
             msg <- P.embed $ Ex.catchAny (Right <$> receiveData ws) handleWSException
 
             case msg of
-              Left c ->
+              Left (c, reason) -> do
+                whenJust reason (\r -> error $ "Shard closed with reason: " <> r)
                 P.embed . atomically $ writeTBMQueue outqueue (Control c)
 
               Right msg' -> do
@@ -178,7 +180,7 @@
     info $ "starting up shard "+| (shard ^. #shardID) |+" of "+| (shard ^. #shardCount) |+""
 
 
-    innerLoopVal <- websocketToIO $ runWebsocket host' "/?v=7&encoding=json" innerloop
+    innerLoopVal <- websocketToIO $ runWebsocket host' "/?v=6&encoding=json" innerloop
 
     case innerLoopVal of
       ShardFlowShutDown -> do
@@ -268,13 +270,13 @@
 
     InvalidSession resumable -> do
       if resumable
-      then do
+      then
+        info "Received resumable invalid session"
+      else do
         info "Received non-resumable invalid session, sleeping for 15 seconds then retrying"
         P.atomicModify (#sessionID .~ Nothing)
         P.atomicModify (#seqNum .~ Nothing)
         P.embed $ threadDelay (15 * 1000 * 1000)
-      else
-        info "Received resumable invalid session"
       P.throw ShardFlowRestart
 
     Hello interval -> do
diff --git a/src/Calamity/Gateway/Types.hs b/src/Calamity/Gateway/Types.hs
--- a/src/Calamity/Gateway/Types.hs
+++ b/src/Calamity/Gateway/Types.hs
@@ -41,6 +41,8 @@
 import qualified Polysemy                         as P
 import qualified Polysemy.Async                   as P
 import qualified Polysemy.AtomicState             as P
+import qualified TextShow.Generic as TSG
+import TextShow (TextShow)
 
 type ShardC r = (P.Members '[LogEff, P.AtomicState ShardState, P.Embed IO, P.Final IO,
   P.Async, MetricEff] r)
@@ -214,7 +216,7 @@
   , afk    :: Bool
   }
   deriving ( Show, Generic )
-  deriving ToJSON via CalamityJSON StatusUpdateData
+  deriving ToJSON via CalamityJSONKeepNothing StatusUpdateData
 
 data ResumeData = ResumeData
   { token     :: Text
@@ -248,12 +250,13 @@
   = RestartShard
   | ShutDownShard
   | SendPresence StatusUpdateData
-  deriving ( Show )
+  deriving ( Show, Generic )
 
 data ShardFlowControl
   = ShardFlowRestart
   | ShardFlowShutDown
-  deriving ( Show )
+  deriving ( Show, Generic )
+  deriving ( TextShow ) via TSG.FromGeneric ShardFlowControl
 
 data Shard = Shard
   { shardID       :: Int
diff --git a/src/Calamity/Internal/AesonThings.hs b/src/Calamity/Internal/AesonThings.hs
--- a/src/Calamity/Internal/AesonThings.hs
+++ b/src/Calamity/Internal/AesonThings.hs
@@ -9,6 +9,7 @@
     , DefaultToZero
     , DefaultToFalse
     , CalamityJSON(..)
+    , CalamityJSONKeepNothing(..)
     , jsonOptions
     , jsonOptionsKeepNothing ) where
 
@@ -113,6 +114,19 @@
 
 instance (Typeable a, Generic a, GFromJSON Zero (Rep a)) => FromJSON (CalamityJSON a) where
   parseJSON = fmap CalamityJSON . genericParseJSON jsonOptions
+
+-- | version that keeps Nothing fields
+newtype CalamityJSONKeepNothing a = CalamityJSONKeepNothing
+  { unCalamityJSONKeepNothing :: a
+  }
+
+instance (Typeable a, Generic a, GToJSON Zero (Rep a), GToEncoding Zero (Rep a)) => ToJSON (CalamityJSONKeepNothing a) where
+  toJSON = genericToJSON jsonOptionsKeepNothing . unCalamityJSONKeepNothing
+
+  toEncoding = genericToEncoding jsonOptionsKeepNothing . unCalamityJSONKeepNothing
+
+instance (Typeable a, Generic a, GFromJSON Zero (Rep a)) => FromJSON (CalamityJSONKeepNothing a) where
+  parseJSON = fmap CalamityJSONKeepNothing . genericParseJSON jsonOptionsKeepNothing
 
 jsonOptions :: Options
 jsonOptions = defaultOptions { sumEncoding        = UntaggedValue
