Fixed bugs with the single threaded runner and optimized the sample.