modify adapter

there is a bug here, foreach method won't add script to multiscripts
fields. cause it's use getenumerator.