Fixes #194 and fixes #193.
Merge pull request #197 from drewww/misc-fixes

Fixes #194 and fixes #193.