I have forked this in github and fixed it. I have also made a pull request to merge into the main branch.
Pull Request;