bug fixed with dom tree