Fix #146, #163
Merge pull request #164 from LisaHelm/master

Fixes for #146, #163