improved the way threads are retrieved from the runtime after launching web server