Bugfix.
Added multithreading.