Fixed issue in which nextTasks are calculated on different starting thread.