Returning index to buttons of old