Attempting to fix #116

Sorry, couldn't find how to add this pull request to the actual issue. Hopefully you can do that.

I also apologize for the lack of unit tests; the project isn't well-covered and setting up the mojo in the context of a unit test proved impossible, so I gave up.