Multithread was not properly detached

..causing crash in some cases returning 'native thread exited without detaching' error message.