fix indexing table classcastexception