diff --git a/src/engine.c b/src/engine.c
index 7b2d490570b3102ef252ae450f51df1b1429823f..665b32a0c4aa2ad21e4c64a9875085332eb97a38 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -1456,7 +1456,6 @@ void engine_maketasks(struct engine *e) {
      of its super-cell. */
   threadpool_map(&e->threadpool, engine_make_extra_hydroloop_tasks_mapper,
                  sched->tasks, sched->nr_tasks, sizeof(struct task), e);
-  // engine_make_extra_hydroloop_tasks(e);
 
   /* Add the communication tasks if MPI is being used. */
   if (e->policy & engine_policy_mpi) {
diff --git a/src/scheduler.c b/src/scheduler.c
index 75b3e196279d448e15c7a2bae2ceb9339559f644..9ee41c928dc197ab2cac75c0ac9ec9d216471575 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -729,15 +729,12 @@ void scheduler_set_unlocks(struct scheduler *s) {
   offsets[0] = 0;
   for (int k = 1; k < s->nr_tasks; k++)
     offsets[k] = offsets[k - 1] + counts[k - 1];
-  for (int k = 0; k < s->nr_tasks; k++)
-    for (int j = offsets[k]; j < offsets[k + 1]; j++) s->unlock_ind[j] = k;
 
   /* Set the unlocks in the tasks. */
   for (int k = 0; k < s->nr_tasks; k++) {
     struct task *t = &s->tasks[k];
     t->nr_unlock_tasks = counts[k];
     t->unlock_tasks = &s->unlocks[offsets[k]];
-    for (int j = offsets[k]; j < offsets[k + 1]; j++) s->unlock_ind[j] = k;
   }
 
   /* Verify that there are no duplicate unlocks. */
diff --git a/src/task.c b/src/task.c
index f7a04454b70688830f9577999c789cb3be7ee619..c8f69681c8ac3a142a7fdebd3778eedd5cae546a 100644
--- a/src/task.c
+++ b/src/task.c
@@ -49,7 +49,7 @@
 const char *taskID_names[task_type_count] = {
     "none",    "sort",    "self",      "pair",          "sub",       "init",
     "ghost",   "drift",   "kick",      "send",          "recv",      "grav_pp",
-    "grav_mm", "grav_up", "grav_down", "grav_external", "comm_root "};
+    "grav_mm", "grav_up", "grav_down", "grav_external", "comm_root"};
 
 const char *subtaskID_names[task_type_count] = {"none",  "density",
                                                 "force", "grav"};
diff --git a/src/threadpool.c b/src/threadpool.c
index 72a33639dbb47f3e7dc5a0b1466cf7ea179c590a..691678718e98abea154f75f3018aa420d7ee5ce1 100644
--- a/src/threadpool.c
+++ b/src/threadpool.c
@@ -50,9 +50,7 @@ void *threadpool_runner(void *data) {
 
     /* Wait for a signal. */
     pthread_mutex_lock(&tp->thread_mutex);
-    do {
-      pthread_cond_wait(&tp->thread_cond, &tp->thread_mutex);
-    } while (tp->map_function == NULL);
+    pthread_cond_wait(&tp->thread_cond, &tp->thread_mutex);
     pthread_mutex_unlock(&tp->thread_mutex);
 
     /* The index of the mapping task we will work on next. */