Second problem in thread.c