fixing threads