fix setting id of document