Fixed the opts type error
updated indexof dep