add index on errors when needed
remove lodash from this
Merge pull request #12 from kazalt/indexErrors

add index on errors when needed