fix setting document data from array