Fixed bug with default thread initialization