Fix #14 and #15
Merge pull request #29 from gideonthomas/issue14

Fix #14 and #15