fix issue #1581
Merge pull request #1582 from fowlmouth/patch-1

fix issue #1581