thread fix with const