bugfixed for key of domain