fix bug 1821
Merge pull request #46 from davidleibovic/fix-bug-1821

Super nice.