Fixed bug with multy threads, changed processing speed