Fix threads