fixed DOM handling