Fixed cell update function.