fixed bugs in Dom