Fix: Refine update function.