Fix calling of updateDoc