All we did is move the update code higher on the page. I can't imagine how that would make it stop working.
Do you get an error? Anything else you might have changed? Changing the order of the code is unlikely to make it stop working, expecially moving it up should just make it run that much sooner, so it is difficult to imagine that being the cause of it not working now.