fix update thread to actually update different documents