fix thread count