fixed error allowing file lengths to be zero documents.