Optimizations in update.