Default to single-threaded. Fix bugs