set thread number to one as workaround to make it run in the gui