Fix #1793
Merge pull request #1796 from mattn/fix_1793

Fix #1793