fix indexarrayoutofbounds