Apply @dooman87's fix for #51.
Merge pull request #53 from hansenc/fix-51

Apply @dooman87's fix for #51.