fix a compiling bug due to Threads module