Fix bug where update gets called twice.

Bug introduced in commit a5330e4fc5b269518613741414f17985f04bfc99