fix out of bounds array exc