Fixes based off of pull request #14.
Merge commit 'ce474086a3f43cee786709856451c0469fb19afc'