Fix System.Threading.Thread for the main thread