Fixes #8
Fixes #48
Merge branch 'issue-8'