fixed dom events bug