fixed dom decode method