finish fixing bugs in the duplication of domain