fix bug in #854 for data structures with >2 elements
Merge pull request #866 from dwightguth/whitespace

fix bug in #854 for data structures with >2 elements