Fix random index