Settings and thread fixes.