Fix update functionality