Fix a couple of high priority findbugs issues.

i think indexOf takes a character sequence rather than a regExp. Not sure this'll work