Prevent indexOf + splice issues when indexOf returns -1.
Merge pull request #106 from Battlefy/fix/prevent-indexOf-errors

Prevent indexOf + splice issues when indexOf returns -1.