Linux fixed thread error