Fixed volatile warnings by using Thread.VolatileRead() as needed.