diff --git a/NEWS b/NEWS
index 21c0889691d0406b5d132bf811505489f0601184..efc1e3a01d1d205c0ba2b5e5654aa59b9ce99dab 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,7 @@ documents those changes that are of interest to users and admins.
     supported).
  -- Remove contribs/python/hostlist files. Download the materials as needed
     directly from http://www.nsc.liu.se/~kent/python-hostlist.
+ -- BLUEGENE - Preemption now works on bluegene systems
 
 * Changes in SLURM 2.1.0-pre4
 =============================
diff --git a/src/common/read_config.c b/src/common/read_config.c
index dedab804a944a1a541755132d9240fe099a06d33..62756eed4daad3072bfc1744476faa363469f829 100644
--- a/src/common/read_config.c
+++ b/src/common/read_config.c
@@ -334,7 +334,7 @@ static void _set_node_prefix(const char *nodenames)
 	}
 	debug3("Prefix is %s %s %d", conf_ptr->node_prefix, nodenames, i);
 }
-#endif /* HAVE_BG */
+#endif /* HAVE_3D */
 
 
 static int _parse_nodename(void **dest, slurm_parser_enum_t type,
diff --git a/src/plugins/preempt/partition_prio/preempt_partition_prio.c b/src/plugins/preempt/partition_prio/preempt_partition_prio.c
index 3baa6b528f88239887d119cbbe6b9bb32342f167..5a5a66f11c37474e8723b5e98c6be39715d1c682 100644
--- a/src/plugins/preempt/partition_prio/preempt_partition_prio.c
+++ b/src/plugins/preempt/partition_prio/preempt_partition_prio.c
@@ -50,8 +50,7 @@ const char	plugin_name[]	= "Preempt by partition priority plugin";
 const char	plugin_type[]	= "preempt/partition_prio";
 const uint32_t	plugin_version	= 100;
 
-static uint32_t _gen_job_prio(struct job_record **job_pptr);
-static void _preempt_list_del(void *x);
+static uint32_t _gen_job_prio(struct job_record *job_ptr);
 static int  _sort_by_prio (void *x, void *y);
 
 /**************************************************************************/
@@ -77,7 +76,7 @@ extern void fini( void )
 extern List find_preemptable_jobs(struct job_record *job_ptr)
 {
 	ListIterator job_iterator;
-	struct job_record *job_p, **preemptee_ptr;
+	struct job_record *job_p;
 	List preemptee_job_list = NULL;
 
 	/* Validate the preemptor job */
@@ -116,13 +115,11 @@ extern List find_preemptable_jobs(struct job_record *job_ptr)
 
 		/* This job is a preemption candidate */
 		if (preemptee_job_list == NULL) {
-			preemptee_job_list = list_create(_preempt_list_del);
+			preemptee_job_list = list_create(NULL);
 			if (preemptee_job_list == NULL)
 				fatal("list_create malloc failure");
 		}
-		preemptee_ptr = xmalloc(sizeof(struct job_record *));
-		preemptee_ptr[0] = job_p;
-		list_append(preemptee_job_list, preemptee_ptr);
+		list_append(preemptee_job_list, job_p);
 	}
 	list_iterator_destroy(job_iterator);
 
@@ -131,9 +128,8 @@ extern List find_preemptable_jobs(struct job_record *job_ptr)
 	return preemptee_job_list;
 }
 
-static uint32_t _gen_job_prio(struct job_record **job_pptr)
+static uint32_t _gen_job_prio(struct job_record *job_ptr)
 {
-	struct job_record *job_ptr = *job_pptr;
 	uint32_t job_prio;
 
 	if (job_ptr->part_ptr)
@@ -154,8 +150,8 @@ static int _sort_by_prio (void *x, void *y)
 	int rc;
 	uint32_t job_prio1, job_prio2;
 
-	job_prio1 = _gen_job_prio((struct job_record **) x);
-	job_prio2 = _gen_job_prio((struct job_record **) y);
+	job_prio1 = _gen_job_prio((struct job_record *) x);
+	job_prio2 = _gen_job_prio((struct job_record *) y);
 
 	if (job_prio1 > job_prio2)
 		rc = 1;
@@ -166,8 +162,3 @@ static int _sort_by_prio (void *x, void *y)
 
 	return rc;
 }
-
-static void _preempt_list_del(void *x)
-{
-	xfree(x);
-}
diff --git a/src/plugins/preempt/qos/preempt_qos.c b/src/plugins/preempt/qos/preempt_qos.c
index f187b52435b524c9a76f5b5bc5734aa91b3012d5..29e6911aa2554fc292382eefebb051725e7025ac 100644
--- a/src/plugins/preempt/qos/preempt_qos.c
+++ b/src/plugins/preempt/qos/preempt_qos.c
@@ -51,8 +51,7 @@ const char	plugin_name[]	= "Preempt by Quality Of Service (QOS)";
 const char	plugin_type[]	= "preempt/qos";
 const uint32_t	plugin_version	= 100;
 
-static uint32_t _gen_job_prio(struct job_record **job_pptr);
-static void _preempt_list_del(void *x);
+static uint32_t _gen_job_prio(struct job_record *job_ptr);
 static bool _qos_preemptable(struct job_record *preemptee, 
 			     struct job_record *preemptor);
 static int  _sort_by_prio (void *x, void *y);
@@ -80,7 +79,7 @@ extern void fini( void )
 extern List find_preemptable_jobs(struct job_record *job_ptr)
 {
 	ListIterator job_iterator;
-	struct job_record *job_p, **preemptee_ptr;
+	struct job_record *job_p;
 	List preemptee_job_list = NULL;
 
 	/* Validate the preemptor job */
@@ -109,8 +108,9 @@ extern List find_preemptable_jobs(struct job_record *job_ptr)
 	while ((job_p = (struct job_record *) list_next(job_iterator))) {
 		if (!IS_JOB_RUNNING(job_p) && !IS_JOB_SUSPENDED(job_p))
 			continue;
-		if (!_qos_preemptable(job_p, job_ptr))
+		if (!_qos_preemptable(job_p, job_ptr)) 
 			continue;
+		
 		if ((job_p->node_bitmap == NULL) ||
 		    (bit_overlap(job_p->node_bitmap, 
 				 job_ptr->part_ptr->node_bitmap) == 0))
@@ -118,13 +118,11 @@ extern List find_preemptable_jobs(struct job_record *job_ptr)
 
 		/* This job is a preemption candidate */
 		if (preemptee_job_list == NULL) {
-			preemptee_job_list = list_create(_preempt_list_del);
+			preemptee_job_list = list_create(NULL);
 			if (preemptee_job_list == NULL)
 				fatal("list_create malloc failure");
 		}
-		preemptee_ptr = xmalloc(sizeof(struct job_record *));
-		preemptee_ptr[0] = job_p;
-		list_append(preemptee_job_list, preemptee_ptr);
+		list_append(preemptee_job_list, job_p);
 	}
 	list_iterator_destroy(job_iterator);
 
@@ -137,19 +135,19 @@ static bool _qos_preemptable(struct job_record *preemptee,
 			     struct job_record *preemptor)
 {
 	acct_qos_rec_t *qos_ee = preemptee->qos_ptr;
-	acct_qos_rec_t *qos_or = preemptee->qos_ptr;
+	acct_qos_rec_t *qos_or = preemptor->qos_ptr;
 
 	if ((qos_ee == NULL) || (qos_or == NULL) ||
-	    (qos_or->preempt_bitstr == NULL)     ||
-	    (!bit_test(qos_or->preempt_bitstr, qos_ee->id)))
+	    (qos_or->preempt_bitstr == NULL) ||
+	    !bit_test(qos_or->preempt_bitstr, qos_ee->id))
 		return false;
+	
 	return true;
 
 }
 
-static uint32_t _gen_job_prio(struct job_record **job_pptr)
+static uint32_t _gen_job_prio(struct job_record *job_ptr)
 {
-	struct job_record *job_ptr = *job_pptr;
 	uint32_t job_prio;
 	acct_qos_rec_t *qos_ptr = job_ptr->qos_ptr;
 
@@ -171,8 +169,8 @@ static int _sort_by_prio (void *x, void *y)
 	int rc;
 	uint32_t job_prio1, job_prio2;
 
-	job_prio1 = _gen_job_prio((struct job_record **) x);
-	job_prio2 = _gen_job_prio((struct job_record **) y);
+	job_prio1 = _gen_job_prio((struct job_record *) x);
+	job_prio2 = _gen_job_prio((struct job_record *) y);
 
 	if (job_prio1 > job_prio2)
 		rc = 1;
@@ -183,8 +181,3 @@ static int _sort_by_prio (void *x, void *y)
 
 	return rc;
 }
-
-static void _preempt_list_del(void *x)
-{
-	xfree(x);
-}
diff --git a/src/plugins/select/bluegene/plugin/bg_job_place.c b/src/plugins/select/bluegene/plugin/bg_job_place.c
index d4d6bd71f0f71448236321a6e0c8c6f4e9f69929..1775b6776a647ffed033a026b57dc75f5f7e22b1 100644
--- a/src/plugins/select/bluegene/plugin/bg_job_place.c
+++ b/src/plugins/select/bluegene/plugin/bg_job_place.c
@@ -104,7 +104,7 @@ static int _find_best_block_match(List block_list, int *blocks_added,
 				  uint32_t min_nodes, 
 				  uint32_t max_nodes, uint32_t req_nodes,
 				  bg_record_t** found_bg_record,
-				  bool test_only);
+				  bool test_only, int avail_cpus);
 static int _sync_block_lists(List full_list, List incomp_list);
 
 /* Rotate a 3-D geometry array through its six permutations */
@@ -823,7 +823,7 @@ static int _find_best_block_match(List block_list,
 				  uint32_t min_nodes, uint32_t max_nodes,
 				  uint32_t req_nodes,
 				  bg_record_t** found_bg_record, 
-				  bool test_only)
+				  bool test_only, int avail_cpus)
 {
 	bg_record_t *bg_record = NULL;
 	uint16_t req_geometry[BA_SYSTEM_DIMENSIONS];
@@ -857,9 +857,9 @@ static int _find_best_block_match(List block_list,
 		return SLURM_ERROR;
 	}
 
-	if(!test_only && req_procs > num_unused_cpus) {
+	if(!test_only && (req_procs > avail_cpus)) {
 		debug2("asking for %u I only got %d", 
-		       req_procs, num_unused_cpus);
+		       req_procs, avail_cpus);
 		return SLURM_ERROR;
 	}
 
@@ -1348,9 +1348,11 @@ static List _get_preemptables(bg_record_t *bg_record, List preempt_jobs)
 			if(job_ptr == found_record->job_ptr)
 				break;
 		}
-		if(job_ptr) 
+		if(job_ptr) {
 			list_append(preempt, job_ptr);
-		else {
+/* 			info("going to preempt %u running on %s", */
+/* 			     job_ptr->job_id, found_record->bg_block_id); */
+		} else {
 			error("Job %u running on block %s "
 			      "wasn't in the preempt list, but needs to be "
 			      "preempted for queried job to run on block %s",
@@ -1370,12 +1372,17 @@ static List _get_preemptables(bg_record_t *bg_record, List preempt_jobs)
 	return preempt;
 }
 
+/* Remove the jobs from the block list, this block list can not be
+ * equal to the main block list.  And then return the number of cpus
+ * we freed up by removing the jobs.
+ */
 static int _remove_preemptables(List block_list, List preempt_jobs) 
 {
 	ListIterator itr;
 	ListIterator job_itr;
 	bg_record_t *found_record;
 	struct job_record *job_ptr;
+	int freed_cpus = 0;
 
 	xassert(block_list);
 	xassert(block_list != bg_lists->main);
@@ -1386,8 +1393,12 @@ static int _remove_preemptables(List block_list, List preempt_jobs)
 	while((job_ptr = list_next(job_itr))) {
 		while((found_record = list_next(itr))) {
 			if (found_record->job_ptr == job_ptr) {
+/* 				info("removing job %u running on %s", */
+/* 				     job_ptr->job_id, */
+/* 				     found_record->bg_block_id); */
 				found_record->job_ptr = NULL;
 				found_record->job_running = NO_JOB_RUNNING;
+				freed_cpus += found_record->cpu_cnt;
 				break;
 			}
 		}
@@ -1396,13 +1407,12 @@ static int _remove_preemptables(List block_list, List preempt_jobs)
 		if(!found_record) 
 			error("Job %u wasn't found running anywhere, "
 			      "can't preempt",
-			      job_ptr->job_id);
-		
+			      job_ptr->job_id);		
 	}
 	list_iterator_destroy(itr);
 	list_iterator_destroy(job_itr);
 	
-	return SLURM_SUCCESS;
+	return freed_cpus;
 }
 
 /*
@@ -1434,7 +1444,8 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 	List block_list = NULL;
 	int blocks_added = 0;
 	time_t starttime = time(NULL);
-	bool test_only;
+	bool test_only, preempt_done=false;
+	int avail_cpus = num_unused_cpus;
 
 	if (mode == SELECT_MODE_RUN_NOW 
 	    || (preemptee_candidates && mode != SELECT_MODE_TEST_ONLY))
@@ -1511,16 +1522,13 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 	
 	/* just remove the preemptable jobs now since we are treating
 	   this as a run now deal */
-	if((mode != SELECT_MODE_TEST_ONLY)
-	   && preemptee_candidates && preemptee_job_list) 
-		_remove_preemptables(block_list, preemptee_candidates);
-	
+preempt:	
 	list_sort(block_list, (ListCmpF)_bg_record_sort_aval_dec);
 
 	rc = _find_best_block_match(block_list, &blocks_added,
 				    job_ptr, slurm_block_bitmap, min_nodes, 
 				    max_nodes, req_nodes,  
-				    &bg_record, test_only);
+				    &bg_record, test_only, avail_cpus);
 	
 	if(rc == SLURM_SUCCESS) {
 		if(bg_record) {
@@ -1553,7 +1561,7 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 			if(!bg_record->bg_block_id) {
 				debug2("%d can start unassigned job %u at "
 				       "%u on %s",
-				       test_only, job_ptr->job_id, starttime,
+				       mode, job_ptr->job_id, starttime,
 				       bg_record->nodes);
 
 				select_g_select_jobinfo_set(
@@ -1583,7 +1591,7 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 					      "non-shared partition");
 				
 				debug2("%d can start job %u at %u on %s(%s)",
-				       test_only, job_ptr->job_id, starttime,
+				       mode, job_ptr->job_id, starttime,
 				       bg_record->bg_block_id,
 				       bg_record->nodes);
 				
@@ -1611,6 +1619,12 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap,
 		} else {
 			error("we got a success, but no block back");
 		}
+	} else if(!preempt_done && (mode != SELECT_MODE_TEST_ONLY)
+		  && preemptee_candidates && preemptee_job_list) {
+		avail_cpus += _remove_preemptables(
+			block_list, preemptee_candidates);
+		preempt_done = true;
+		goto preempt;
 	}
 
 	if(bg_conf->layout_mode == LAYOUT_DYNAMIC) {		
diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c
index 032d77aa3a0393c481cfc54161d3f4f3aaa7cf35..ebca058105dcd66304e970b2bd7c6a4f6787246f 100644
--- a/src/plugins/select/cons_res/select_cons_res.c
+++ b/src/plugins/select/cons_res/select_cons_res.c
@@ -515,9 +515,9 @@ static void _create_part_data()
 /* List sort function: sort by the job's expected end time */
 static int _cr_job_list_sort(void *x, void *y)
 {
-	struct job_record **job1_pptr = (struct job_record **) x;
-	struct job_record **job2_pptr = (struct job_record **) y;
-	return (int) difftime(job1_pptr[0]->end_time, job2_pptr[0]->end_time);
+	struct job_record *job1_ptr = (struct job_record *) x;
+	struct job_record *job2_ptr = (struct job_record *) y;
+	return (int) difftime(job1_ptr->end_time, job2_ptr->end_time);
 }
 
 
@@ -1108,8 +1108,8 @@ static uint16_t _get_job_node_req(struct job_record *job_ptr)
 
 static int _find_job (void *x, void *key)
 {
-	struct job_record **job_pptr = (struct job_record **) x;
-	if (job_pptr[0] == (struct job_record *) key)
+	struct job_record *job_ptr = (struct job_record *) x;
+	if (job_ptr == (struct job_record *) key)
 		return 1;
 	return 0;
 }
@@ -1146,7 +1146,7 @@ static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap,
 {
 	int rc;
 	bitstr_t *orig_map;
-	struct job_record *tmp_job_ptr, **tmp_job_pptr;;
+	struct job_record *tmp_job_ptr;
 	ListIterator job_iterator, preemptee_iterator;
 	struct part_res_record *future_part;
 	struct node_use_record *future_usage;
@@ -1211,19 +1211,14 @@ static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap,
 			}
 			preemptee_iterator = list_iterator_create(
 						preemptee_candidates);
-			while ((tmp_job_pptr = (struct job_record **)
+			while ((tmp_job_ptr = (struct job_record *)
 					list_next(preemptee_iterator))) {
-				struct job_record **preemptee_ptr;
 				if (bit_overlap(bitmap, 
-						tmp_job_pptr[0]->
-						node_bitmap) == 0)
+						tmp_job_ptr->node_bitmap) == 0)
 					continue;
 
-				preemptee_ptr = xmalloc(sizeof(struct 
-							job_record *));
-				preemptee_ptr[0] = tmp_job_pptr[0];;
 				list_append(*preemptee_job_list, 
-					    preemptee_ptr);
+					    tmp_job_ptr);
 			}
 			list_iterator_destroy(preemptee_iterator);
 		}
@@ -1246,7 +1241,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 {
 	struct part_res_record *future_part;
 	struct node_use_record *future_usage;
-	struct job_record *tmp_job_ptr, **tmp_job_pptr;
+	struct job_record *tmp_job_ptr;
 	List cr_job_list;
 	ListIterator job_iterator, preemptee_iterator;
 	bitstr_t *orig_map;
@@ -1303,11 +1298,8 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 			/* Remove preemptable job now */
 			_rm_job_from_res(future_part, future_usage,
 					 tmp_job_ptr, action);
-		} else {
-			tmp_job_pptr = xmalloc(sizeof(struct job_record *));
-			*tmp_job_pptr = tmp_job_ptr;
-			list_append(cr_job_list, tmp_job_pptr);
-		}
+		} else 
+			list_append(cr_job_list, tmp_job_ptr);
 	}
 	list_iterator_destroy(job_iterator);
 
@@ -1327,8 +1319,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 	if (rc != SLURM_SUCCESS) {
 		list_sort(cr_job_list, _cr_job_list_sort);
 		job_iterator = list_iterator_create(cr_job_list);
-		while ((tmp_job_pptr = list_next(job_iterator))) {
-			tmp_job_ptr = *tmp_job_pptr;
+		while ((tmp_job_ptr = list_next(job_iterator))) {
 			_rm_job_from_res(future_part, future_usage, 
 					 tmp_job_ptr, 0);
 			bit_or(bitmap, orig_map);
@@ -1360,15 +1351,12 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 				fatal("list_create malloc failure");
 		}
 		preemptee_iterator =list_iterator_create(preemptee_candidates);
-		while ((tmp_job_pptr = (struct job_record **)
+		while ((tmp_job_ptr = (struct job_record *)
 				list_next(preemptee_iterator))) {
-			struct job_record **preemptee_ptr;
 			if (bit_overlap(bitmap, 
-					tmp_job_pptr[0]->node_bitmap) == 0)
+					tmp_job_ptr->node_bitmap) == 0)
 				continue;
-			preemptee_ptr = xmalloc(sizeof(struct job_record *));
-			preemptee_ptr[0] = tmp_job_pptr[0];
-			list_append(*preemptee_job_list, preemptee_ptr);
+			list_append(*preemptee_job_list, tmp_job_ptr);
 		}
 		list_iterator_destroy(preemptee_iterator);
 	}
diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c
index 77aba0fa25612beb444e2c1100f12406b143347a..35652324580dfc56a3e6898da0b07079d6cde0f0 100644
--- a/src/plugins/select/linear/select_linear.c
+++ b/src/plugins/select/linear/select_linear.c
@@ -1639,8 +1639,8 @@ static void _init_node_cr(void)
 
 static int _find_job (void *x, void *key)
 {
-	struct job_record **job_pptr = (struct job_record **) x;
-	if (job_pptr[0] == (struct job_record *) key)
+	struct job_record *job_ptr = (struct job_record *) x;
+	if (job_ptr == (struct job_record *) key)
 		return 1;
 	return 0;
 }
@@ -1681,7 +1681,7 @@ static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap,
 
 	bitstr_t *orig_map;
 	int max_run_job, j, sus_jobs, rc = EINVAL, prev_cnt = -1;
-	struct job_record *tmp_job_ptr, **tmp_job_pptr;
+	struct job_record *tmp_job_ptr;
 	ListIterator job_iterator, preemptee_iterator;
 	struct node_cr_record *exp_node_cr;
 
@@ -1767,19 +1767,14 @@ static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap,
 			}
 			preemptee_iterator = list_iterator_create(
 						preemptee_candidates);
-			while ((tmp_job_pptr = (struct job_record **)
+			while ((tmp_job_ptr = (struct job_record *)
 					list_next(preemptee_iterator))) {
-				struct job_record **preemptee_ptr;
 				if (bit_overlap(bitmap, 
-						tmp_job_pptr[0]->
-						node_bitmap) == 0)
+						tmp_job_ptr->node_bitmap) == 0)
 					continue;
 
-				preemptee_ptr = xmalloc(sizeof(struct 
-							job_record *));
-				preemptee_ptr[0] = tmp_job_pptr[0];
 				list_append(*preemptee_job_list, 
-					    preemptee_ptr);
+					    tmp_job_ptr);
 			}
 			list_iterator_destroy(preemptee_iterator);
 		}
@@ -1803,7 +1798,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 			  List *preemptee_job_list)
 {
 	struct node_cr_record *exp_node_cr;
-	struct job_record *tmp_job_ptr, **tmp_job_pptr;
+	struct job_record *tmp_job_ptr;
 	List cr_job_list;
 	ListIterator job_iterator, preemptee_iterator;
 	bitstr_t *orig_map;
@@ -1854,11 +1849,9 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 			_rm_job_from_nodes(exp_node_cr, tmp_job_ptr,
 					   "_will_run_test", 
 					   _job_preemption_killing());
-		} else {
-			tmp_job_pptr = xmalloc(sizeof(struct job_record *));
-			*tmp_job_pptr = tmp_job_ptr;
-			list_append(cr_job_list, tmp_job_pptr);
-		}
+		} else 
+			list_append(cr_job_list, tmp_job_ptr);
+		
 	}
 	list_iterator_destroy(job_iterator);
 
@@ -1879,9 +1872,8 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 	if (rc != SLURM_SUCCESS) {
 		list_sort(cr_job_list, _cr_job_list_sort);
 		job_iterator = list_iterator_create(cr_job_list);
-		while ((tmp_job_pptr = (struct job_record **) 
+		while ((tmp_job_ptr = (struct job_record *) 
 				       list_next(job_iterator))) {
-			tmp_job_ptr = *tmp_job_pptr;
 			_rm_job_from_nodes(exp_node_cr, tmp_job_ptr,
 					   "_will_run_test", true);
 			i = _job_count_bitmap(exp_node_cr, job_ptr, orig_map, 
@@ -1913,16 +1905,13 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 				fatal("list_create malloc failure");
 		}
 		preemptee_iterator =list_iterator_create(preemptee_candidates);
-		while ((tmp_job_pptr = (struct job_record **)
+		while ((tmp_job_ptr = (struct job_record *)
 				list_next(preemptee_iterator))) {
-			struct job_record **preemptee_ptr;
 			if (bit_overlap(bitmap, 
-					tmp_job_pptr[0]->node_bitmap) == 0)
+					tmp_job_ptr->node_bitmap) == 0)
 				continue;
 
-			preemptee_ptr = xmalloc(sizeof(struct job_record *));
-			preemptee_ptr[0] = tmp_job_pptr[0];
-			list_append(*preemptee_job_list, preemptee_ptr);
+			list_append(*preemptee_job_list, tmp_job_ptr);
 		}
 		list_iterator_destroy(preemptee_iterator);
 	}
@@ -1940,9 +1929,9 @@ static void _cr_job_list_del(void *x)
 
 static int  _cr_job_list_sort(void *x, void *y)
 {
-	struct job_record **job1_pptr = (struct job_record **) x;
-	struct job_record **job2_pptr = (struct job_record **) y;
-	return (int) difftime(job1_pptr[0]->end_time, job2_pptr[0]->end_time);
+	struct job_record *job1_ptr = (struct job_record *) x;
+	struct job_record *job2_ptr = (struct job_record *) y;
+	return (int) difftime(job1_ptr->end_time, job2_ptr->end_time);
 }
 
 static void _preempt_list_del(void *x)
diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index 5f335821296fa3fc393022d9d5c73df4f19d154a..0176d9b334563d55c32938ad7fd0f94d3010ae52 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -4458,7 +4458,7 @@ void reset_job_bitmaps(void)
 		}
 			
 	}
-	if (slurm_get_preempt_mode() != PREEMPT_MODE_OFF)
+	if (slurm_get_preempt_mode() == PREEMPT_MODE_GANG)
 		gang_flag = true;
 
 	job_iterator = list_iterator_create(job_list);
diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c
index 2154e967ada00be6a8a26ec12afe47d7768e3400..82e08b373da68bcc03a74e4a7bf65640b35da359 100644
--- a/src/slurmctld/node_scheduler.c
+++ b/src/slurmctld/node_scheduler.c
@@ -956,7 +956,7 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size,
 static void _preempt_jobs(List preemptee_job_list, int *error_code)
 {
 	ListIterator iter;
-	struct job_record **job_pptr, *job_ptr;
+	struct job_record *job_ptr;
 	uint16_t mode;
 	int job_cnt = 0, rc = 0;
 
@@ -968,8 +968,7 @@ static void _preempt_jobs(List preemptee_job_list, int *error_code)
 	iter = list_iterator_create(preemptee_job_list);
 	if (!iter)
 		fatal("list_iterator_create: malloc failure");
-	while ((job_pptr = (struct job_record **) list_next(iter))) {
-		job_ptr = job_pptr[0];
+	while ((job_ptr = (struct job_record *) list_next(iter))) {
 		job_cnt++;
 		if (mode == PREEMPT_MODE_CANCEL) {
 			rc = job_signal(job_ptr->job_id, SIGKILL, 0, 0);