Merge pull request #48 from jamessan/issue-47