diff --git a/exec/load/msgutils.js b/exec/load/msgutils.js
index 616f730c1318fb045bbed895ed443e1223ab15c8..36e4eb1cf7995095ad2a418f51ac5f1c27f29836 100644
--- a/exec/load/msgutils.js
+++ b/exec/load/msgutils.js
@@ -441,6 +441,7 @@ function getMessageThreads(sub, max) {
 			threads.dates.push(header.when_written_time);
 			threads.thread[new_thread] = {
 				dateIndex : threads.dates.length - 1,
+				messages : [],
 			}
 			add_to_thread(header, threads.thread[new_thread]);
 		}