Fix extend Document; Fix empty models.