fix state
Finalisation thread_cancel + test