fix some dom processing