fixed thread number double to int