Replace .getIndex() with .equals(). Now it's not just a partial match.