fixed dom scope error