Better fix for issue #89

This should fix issue #89. Improved it per yellis's recommendations in the previous pull request.
Merge pull request #92 from JoeBlevins/patch-2

Better fix for issue #89