fix for nested documents which should expand