fix bug with passing in opts.keys as array