diff --git a/Network/Xmpp/Extras/MUC.hs b/Network/Xmpp/Extras/MUC.hs
--- a/Network/Xmpp/Extras/MUC.hs
+++ b/Network/Xmpp/Extras/MUC.hs
@@ -38,14 +38,14 @@
 
 -- |Join the specified MUC or change your nickname in the already joined one. The resource part of the `Jid` sets the desired nickname.
 joinMUC :: Jid -> Maybe MUCHistoryReq -> Session -> IO (Either XmppFailure ())
-joinMUC jid mhr = sendPresence (maybe id (\hr x -> x { presencePayload = [Element "x" [("xmlns", [ContentText "http://jabber.org/protocol/muc"])] [
+joinMUC jid mhr = sendPresence ((presTo presence jid) { presencePayload = [Element "x" [("xmlns", [ContentText "http://jabber.org/protocol/muc"])] $ maybe [] (\hr -> [
 		NodeElement $ Element "history" (
 			(elementify "maxchars" show $ mhrSeconds hr) ++
 			(elementify "maxstanzas" show $ mhrSeconds hr) ++
 			(elementify "seconds" show $ mhrSeconds hr) ++
 			(elementify "since" toDateTime $ mhrSince hr)
-		) []]
-	] } ) mhr $ (presTo presence jid))
+		) []]) mhr
+	] } )
 	where elementify name show content = fmap (\s -> ("seconds", [ContentText $ T.pack $ show s])) $ maybeToList content
 
 -- |Send a broadcast message. `Jid` must be bare.
diff --git a/pontarius-xmpp-extras.cabal b/pontarius-xmpp-extras.cabal
--- a/pontarius-xmpp-extras.cabal
+++ b/pontarius-xmpp-extras.cabal
@@ -1,5 +1,5 @@
 name:                pontarius-xmpp-extras
-version:             0.1.0.0
+version:             0.1.0.1
 synopsis:            XEPs implementation on top of pontarius-xmpp
 -- description:
 license:             OtherLicense
@@ -18,7 +18,7 @@
 Source-repository this
   type:              git
   location:          https://github.com/l29ah/pontarius-xmpp-extras.git
-  tag:               0.1.0.0
+  tag:               0.1.0.1
 
 library
   exposed-modules:
