fixing DOM issues