Fix bugs in update path.