indexoutofbounds bug