Fixes #129 and #130
Merge pull request #135 from akkie/master

Fixes #129 and #130