fixed bug when creating a document and passing in id= 0 -- if id would create hexdigest id instead of using id 0