fixed bug when QThread is not available