weird index out of bounds