A couple of fixes.

More commits to come.
* Fixes #250 
* Fixes #238