qthread.c errors to be fixed