fix bugs for domain objs