Normalizing the button index.