Fixed instance of old use of 'index' variable