Fixed problem in multi-threading (was using only a single thread, for
debugging).