fix thread.c also