Issue #12

If you find Issue #10 and #12 diffs are good, just use this pull request. #12 builds on #10.