Whoops, off by one error with random index