fix bug where close-together tempDoublePtr operations could cross each other