Thanks for report, troubleshooting and proposing the fix.
Can you make a pull request with your patch? It will be easier to merge. Just see the commit message guidelines at:
—Reply to this email directly or view it on GitHub.