Fixed #1023
Merge pull request #1020 from dvvrd/fix1017

Fixed #1017
Merge pull request #1026 from dvvrd/fix1023

Fixed #1023
Added restriction to 100 threads maximum