ITTE-1106 Fixed concurency problem.
ITTE-1107 Added new flag to bether manage threads.