Fixes thread pooling and resource restriction feature.
Merge remote-tracking branch 'origin/master'