fix bugs in domain classes