Bug fix for 'button' index problem.