Fixed bug when doing multiple updates.