fixed opts.name bug