Improve root threads, thanks to @pmir