Fixes #206 and fixes #203
Merge pull request #216 from jpav/master

Fixes #206 and fixes #203