diff --git a/Shelly.hs b/Shelly.hs
--- a/Shelly.hs
+++ b/Shelly.hs
@@ -767,7 +767,9 @@
 sshPairs' :: (FilePath -> [Text] -> ShIO a) -> Text -> [(FilePath, [Text])] -> ShIO a
 sshPairs' run' server actions = do
   escaping False $ do
-    let ssh_commands = surround '\'' $ foldl1 ((mappend) . (mappend " && ")) (map toSSH actions)
+    let ssh_commands = surround '\'' $ foldl1
+          (\memo next -> memo `mappend` " && " `mappend` next)
+          (map toSSH actions)
     run' "ssh" $ [server, ssh_commands]
   where
     toSSH (exe,args) = show_command exe args
diff --git a/shelly.cabal b/shelly.cabal
--- a/shelly.cabal
+++ b/shelly.cabal
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     0.9.7.2
+Version:     0.9.7.3
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides a single module for convenient
