more fixes for thread architecture