Corrected wrong index being called for the opacity change