Revert "Revert "Merge pull request #186 from irvs/issue185""

This reverts commit 82c64d30cd133519ac8655f63f146409df01d4c5.