also handle errors on embedded documents
cleanup