fix bug in DOM