fix iteration over keys instead of values
Merge pull request #596 from a9y/master

fix iteration over keys instead of values