Fix typo in update function.