Fixed creation of related documents