fix index variables with tuples