Fix update() and updateAt() methods.