fix indexOf and match method calls. closes #7