I fixed this by moving the updates above the search. To maintain the search I added code that restored the post from the previous search and that was overwriting the post for the update and making it not do the update. Please download the page for your records.