small bugfix for init of thread number