Fixes bug 551
Merge pull request #562
merge #562

Thanks @mtraynham!
cut duplicate of function

fixed #571
Merge branch 'master' of github.com:dc-js/dc.js