Fixed ProcessEvents