fix enable_threads