fix indexof bug for cassandra