Fix for over 1000 thread