really fix out of bounds access