Fixed maxMatchedStringIndex

This was matching the cmd and sensors in the same episode rather than subsequent ones.