diff --git a/NEWS b/NEWS
index 059910f3094ada8a9c621c43068c3df9ec9eff22..2655880729c14b876d730a92fdd179e3a333e835 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,11 @@ documents those changes that are of interest to users and admins.
     the code)
  -- Added support for OSX build.
 
+* Changes in SLURM 1.1.13
+=========================
+ - Fix hang in sched/wiki2 if Moab stops responding responding when 
+   response is outgoing. 
+
 * Changes in SLURM 1.1.12
 =========================
  - Sched/wiki2 to report a job's account as COMMENT response to GETJOBS
diff --git a/doc/man/man8/spank.8 b/doc/man/man8/spank.8
index 2981bcc40f0be319ef73bb2b1da0ecf94042dc70..2c29c89ddd7b07bc408b43ee7121dda9a4fbdec6 100644
--- a/doc/man/man8/spank.8
+++ b/doc/man/man8/spank.8
@@ -318,10 +318,10 @@ int slurm_spank_init (spank_t sp, int ac, char **av)
         if (strncmp ("min_prio=", av[i], 9) == 0) {
             const char *optarg = av[i] + 9;
             if (_str2prio (optarg, &min_prio) < 0) 
-                slurm_error ("Ignoring invalid min_prio value \"%s\"", av[i]);
+                slurm_error ("Ignoring invalid min_prio value: %s", av[i]);
         }
         else {
-            slurm_error ("renice: Invalid option \"%s\"", av[i]);
+            slurm_error ("renice: Invalid option: %s", av[i]);
         }
     }
 
@@ -347,7 +347,7 @@ int slurm_spank_task_post_fork (spank_t sp, int ac, char **av)
             return (0);
 
         if (_str2prio (val, &prio) < 0) {
-            slurm_error ("Bad value for %s: \"%s\"\n", PRIO_ENV_VAR, optarg);
+            slurm_error ("Bad value for %s: %s", PRIO_ENV_VAR, optarg);
             return (-1);
         }
 
@@ -362,7 +362,7 @@ int slurm_spank_task_post_fork (spank_t sp, int ac, char **av)
     spank_get_item (sp, S_TASK_GLOBAL_ID, &taskid);
     spank_get_item (sp, S_TASK_PID, &pid);
 
-    slurm_info ("re-nicing task%d pid %ld to %ld\n", taskid, pid, prio);
+    slurm_info ("re-nicing task%d pid %ld to %ld", taskid, pid, prio);
 
     if (setpriority (PRIO_PROCESS, (int) pid, (int) prio) < 0) {
         slurm_error ("setpriority: %m");
@@ -394,7 +394,7 @@ static int _renice_opt_process (int val, const char *optarg, int remote)
     }
         
     if (_str2prio (optarg, &prio) < 0) {
-        slurm_error ("Bad value for --renice: \"%s\"\n", optarg);
+        slurm_error ("Bad value for --renice: %s", optarg);
         return (-1);
     }
 
diff --git a/src/plugins/sched/wiki2/msg.c b/src/plugins/sched/wiki2/msg.c
index 0ae3020ad63abb03e535070d78c6f333ab0688ae..1058f0332635cfc81231cf54dfba4986036fd625 100644
--- a/src/plugins/sched/wiki2/msg.c
+++ b/src/plugins/sched/wiki2/msg.c
@@ -250,7 +250,7 @@ static size_t	_write_bytes(int fd, char *buf, const size_t size)
 	bytes_remaining = size;
 	ptr = buf;
 	while (bytes_remaining > 0) {
-		bytes_written = write(fd, ptr, size);
+		bytes_written = write(fd, ptr, bytes_remaining);
 		if (bytes_written < 0)
 			return 0;
 		bytes_remaining -= bytes_written;
diff --git a/src/sbcast/agent.c b/src/sbcast/agent.c
index 4f27a23d39637b9cc253808175575d5772e0a8dc..02caee87dfa98c6a2e483496a332fc642ff81f18 100644
--- a/src/sbcast/agent.c
+++ b/src/sbcast/agent.c
@@ -51,6 +51,7 @@
 
 #include "src/common/hostlist.h"
 #include "src/common/log.h"
+#include "src/common/macros.h"
 #include "src/common/read_config.h"
 #include "src/common/slurm_protocol_api.h"
 #include "src/common/slurm_protocol_defs.h"
@@ -181,7 +182,7 @@ extern void send_rpc(file_bcast_msg_t *bcast_msg,
 		debug("using %d threads", threads_used);
 	}
 
-	pthread_attr_init(&attr);
+	slurm_attr_init(&attr);
 	if (pthread_attr_setstacksize(&attr, 3 * 1024*1024))
 		error("pthread_attr_setstacksize: %m");
 	if (pthread_attr_setdetachstate (&attr,