fix for prior commit, use correct indices on elements (#4517)