Fixing some errors in sub-document example