trial of stopping the thread. Not working

For now the thread has to be stopped manually.