Fix Index buttons so that they are limited to the indices