BUG:  overwriting index variables.