Updated variable thats being passed to index to tell index which tab to switch to.